package commandes;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import bdd.DBS;
import beans.Proprietaire;

// Cette cde recupere l'ensemble des clients:
//
public class CommandeProprietaires implements Commande {
  private String next;

  public CommandeProprietaires(String next) {
        this.next = next;
  }

  public String execute(HttpServletRequest req) throws Exception {
	  DBS db = DBS.getInstance();
	  List<Proprietaire> props = db.getDB_Proprietaire().getProprietaires();
	System.out.println("======> proprietaires = "+props);
	  req.setAttribute("proprietaires", props);
          return next;
  }

}
